import './assets/css/reset.css';
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import VueLazyload from 'vue-lazyload';
import loading from './assets/images/loading1.gif';
import Viewer from 'v-viewer'; // 图片预览插件
import 'viewerjs/dist/viewer.css';
import './util/request'; // 拦截器的路径


Vue.use(Viewer);
Viewer.setDefaults({
  inline: false, button: true, navbar: true, title: false, toolbar: true, tooltip: false, movable: false, zoomable: false, rotatable: false, scalable: false, transition: true, fullscreen: false, keyboard: true,
});

Vue.use(ElementUI);
Vue.config.productionTip = false;

Vue.use(VueLazyload, {
  loading,
});

router.afterEach((to,from,next) => {
  window.scrollTo(0,0);
});

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app');
